package com.briup.corejava.day13;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.logging.Handler;

/**
 * 集合工具类 Collections
 * 1、取最大值最小值
 * 2、排序，排序可提供比较器
 * 3、添加集合的元素
 * 4、填充、反转、混洗
 */
public class Test3 {
    public static void main(String[] args) {
        List<String> list = new ArrayList<>();
        System.out.println(list);
        Collections.fill(list,"null");
        System.out.println(list);
        Collections.addAll(list,"3","1","2");
        System.out.println(list);
        Collections.sort(list);
        System.out.println(list);
        // 洗牌
        Collections.shuffle(list);
        System.out.println(list);
    }
}
